module EmployeeContractJsonSerializer
  def self.as_json contract
    contract.to_json(include: [:contract_type, :employee])
  end

  def self.index_json contracts
    contracts.map { |e| JSON.parse(as_json e) }
  end
  
end